import Apps from '../pages/Apps'
import Robot from '../pages/Apps/Robot'
import Talent from '../pages/Talent'
import Resume from '../pages/Talent/Resume'
import CMS from '../pages/CMS.vue'
import Tool from '../pages/ToolMangement/Tool.vue'
import ToolEdit from '../pages/ToolMangement/ToolEdit'
import ToolReview from '../pages/ToolMangement/ToolReview'
import ToolTag from '../pages/ToolMangement/ToolTag'
import Topic from '../pages/ToolMangement/Topic'
import Workbench from '../pages/Workbench'
import WorkbenchConfig from '../pages/Workbench/WorkbenchConfig'

const moduleRoutes = [
  {
    path: '/apps',
    name: 'Apps',
    meta: {
      title: '应用中心'
    },
    component: Apps,
    children: [
      {
        path: '/',
        redirect: 'robot'
      },
      {
        path: 'robot',
        name: 'Robot',
        meta: {
          title: '消息机器人',
          icon: 'dashboard_customize'
        },
        component: Robot
      }
    ]
  },
  {
    path: '/talent',
    name: 'Talent',
    meta: {
      title: '人才管理'
    },
    component: Talent,
    children: [
      {
        path: '/',
        redirect: 'resume'
      },
      {
        path: 'resume',
        name: 'Resume',
        meta: {
          title: '简历管理',
          icon: 'dashboard_customize'
        },
        component: Resume
      },
      {
        path: 'resume-upload',
        name: 'ResumeUpload',
        meta: {
          title: '简历上传',
          icon: 'dashboard_customize'
        },
        component: Resume
      }
    ]
  },
  {
    path: '/cms',
    name: 'Tool',
    meta: {
      title: '内容管理'
    },
    component: CMS,
    children: [
      {
        path: '/',
        redirect: 'tool'
      },
      {
        path: 'tool',
        name: 'ToolManagement',
        meta: {
          title: '工具管理',
          icon: 'dashboard_customize'
        },
        component: Tool
      },
      {
        path: 'tool-edit',
        name: 'ToolEdit',
        meta: {
          title: '工具编辑记录',
          icon: 'build'
        },
        component: ToolEdit
      },
      {
        path: 'tool-review',
        name: 'ToolReview',
        meta: {
          title: '工具审核记录',
          icon: 'admin_panel_settings'
        },
        component: ToolReview
      },
      {
        path: 'tool-tag',
        name: 'ToolTag',
        meta: {
          title: '标签管理',
          icon: 'loyalty'
        },
        component: ToolTag
      },
      {
        path: 'topic',
        name: 'Topic',
        meta: {
          title: '专题管理',
          icon: 'topic'
        },
        component: Topic
      }
    ]
  },
  {
    path: '/workbench',
    name: 'Workbench',
    meta: {
      title: '工作台管理'
    },
    component: Workbench,
    children: [
      {
        path: '/',
        redirect: 'config'
      },
      {
        path: 'config',
        name: 'Config',
        meta: {
          title: '配置管理',
          icon: 'dashboard_customize'
        },
        component: WorkbenchConfig
      }
    ]
  }
]

export default moduleRoutes
